﻿<?php
/**
1）merchant_private_key，商户私钥;merchant_public_key,商户公钥；商户需要按照《密钥对获取工具说明》操作并获取商户私钥，商户公钥。
2）demo提供的merchant_private_key、merchant_public_key是测试商户号1111110166的商户私钥和商户公钥，请商家自行获取并且替换；
3）使用商户私钥加密时需要调用到openssl_sign函数,需要在php_ini文件里打开php_openssl插件
4）php的商户私钥在格式上要求换行，如下所示；
*/

//	$merchant_private_key='MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJxAZL53lsz3JGhCbIvvnhBKwL4Bs28daAkACt0euXnWAN3LfP0E8YktxtHknI1/3GKYapwqDSkojUft/pReHCGozYQdcWUB0ntNIR4vnQxd8/Lli6Cr8ZblCvpDuPhulCssMydSGyWxfXnywFmICbFjgAtjmu+gqNUTpIO/aLr3AgMBAAECgYAgqmGlZBD1trE4zrIsqyKLW2ViE670itxGDWk4AwVZkEDMHY96wf7Q4+4N0VJdTp6/Sgf3r97ifOTUZc/0KpyMpUB05tALhdotZtmwulZS4IYvzA4viwnwKHJwEOt+9HTDj8nJ9NbXNjVnMZA/0qFgfLef/yIOVrFu4118TlMxYQJBAMroDCvQ12kn7SBr6o/CfCu/Cislveb45acJxbYbnm5JoSSGa//JeRIvfCdOh5o3NuYn48DvFZFtxQayGc89ulECQQDFIxtRhLTfp7927AfYcu78nhksVojRFsChmiFpzdwMSsNYMxR5OXoBG6DgQExVzJcwCxqsN93bcNhkdZsQXwbHAkAqJlYQ7AszbvXVXFWXk4ET3VWRbP+r8VxTfLYzhD0/D9CHs9zPf9zEqFSUHb4RjRK8cODg/UlvsmvRXkH6SQphAkBo6HHVQ8Xtb5uYcasLKL69eHT0/2f3vR/t39QANijv8ala+nPevxOKG2XVcOIulp2uV3puQ5yw9rBxZZSLdcZpAkEAyIygKbktvBzftpckT40lI/b6EP7HqcV0I0GpJQSBW1yDu1lpqzkCqI1Aew4GaNsBduNxv2QMEG3amO9jV+HF5w==';

$merchant_private_key='MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALf/+xHa1fDTCsLYPJLHy80aWq3djuV1T34sEsjp7UpLmV9zmOVMYXsoFNKQIcEzei4QdaqnVknzmIl7n1oXmAgHaSUF3qHjCttscDZcTWyrbXKSNr8arHv8hGJrfNB/Ea/+oSTIY7H5cAtWg6VmoPCHvqjafW8/UP60PdqYewrtAgMBAAECgYEAofXhsyK0RKoPg9jA4NabLuuuu/IU8ScklMQIuO8oHsiStXFUOSnVeImcYofaHmzIdDmqyU9IZgnUz9eQOcYg3BotUdUPcGgoqAqDVtmftqjmldP6F6urFpXBazqBrrfJVIgLyNw4PGK6/EmdQxBEtqqgXppRv/ZVZzZPkwObEuECQQDenAam9eAuJYveHtAthkusutsVG5E3gJiXhRhoAqiSQC9mXLTgaWV7zJyA5zYPMvh6IviX/7H+Bqp14lT9wctFAkEA05ljSYShWTCFThtJxJ2d8zq6xCjBgETAdhiH85O/VrdKpwITV/6psByUKp42IdqMJwOaBgnnct8iDK/TAJLniQJABdo+RodyVGRCUB2pRXkhZjInbl+iKr5jxKAIKzveqLGtTViknL3IoD+Z4b2yayXg6H0g4gYj7NTKCH1h1KYSrQJBALbgbcg/YbeU0NF1kibk1ns9+ebJFpvGT9SBVRZ2TjsjBNkcWR2HEp8LxB6lSEGwActCOJ8Zdjh4kpQGbcWkMYkCQAXBTFiyyImO+sfCccVuDSsWS+9jrc5KadHGIvhfoRjIj2VuUKzJ+mXbmXuXnOYmsAefjnMCI6gGtaqkzl527tw=';

	//merchant_public_key,商户公钥，按照说明文档上传此密钥到智付商家后台，位置为"支付设置"->"公钥管理"->"设置商户公钥"，代码中不使用到此变量

//	$merchant_public_key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcQGS+d5bM9yRoQmyL754QSsC+
//AbNvHWgJAArdHrl51gDdy3z9BPGJLcbR5JyNf9ximGqcKg0pKI1H7f6UXhwhqM2E
//HXFlAdJ7TSEeL50MXfPy5Yugq/GW5Qr6Q7j4bpQrLDMnUhslsX158sBZiAmxY4AL
//Y5rvoKjVE6SDv2i69wIDAQAB';

	$merchant_public_key = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3//sR2tXw0wrC2DySx8vNGlqt3Y7ldU9+LBLI6e1KS5lfc5jlTGF7KBTSkCHBM3ouEHWqp1ZJ85iJe59aF5gIB2klBd6h4wrbbHA2XE1sq21ykja/Gqx7/IRia3zQfxGv/qEkyGOx+XALVoOlZqDwh76o2n1vP1D+tD3amHsK7QIDAQAB';

/**
1)dinpay_public_key，智付公钥，每个商家对应一个固定的智付公钥（不是使用工具生成的密钥merchant_public_key，不要混淆）
2)demo提供的dinpay_public_key是测试商户号1111110166的智付公钥，请自行复制对应商户号的智付公钥进行调整和替换。
3）使用智付公钥验证时需要调用openssl_verify函数进行验证,需要在php_ini文件里打开php_openssl插件
*/

//   $dinpay_public_key ='MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCAp6OK0+IAgI3/FLfu3SRgijiT2yy63gkPRuIpSGn5pR+pCPm6eKv7/njdpn9lLiJlcQDya66cIltxRqpYzje+hgMGmdhOWhuNeETF7xVUcmXjeiEnYnydMVPnCGq2AqG/W/3hC6N80E4XeE8cZGu5+tqy7EsTprCC2vRdMqDjGwIDAQAB';

	$dinpay_public_key ='MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWOq5aHSTvdxGPDKZWSl6wrPpnMHW+8lOgVU71jB2vFGuA6dwa/RpJKnz9zmoGryZlgUmfHANnN0uztkgwb+5mpgmegBbNLuGqqHBpQHo2EsiAhgvgO3VRmWC8DARpzNxknsJTBhkUvZdy4GyrjnUrvsARg4VrFzKDWL0Yu3gunQIDAQAB ';




?>